// TOWN DIALOGUE SCRIPT
//    Town 45: Bandit Hideout

begintalkscript;

variables;

short i,j,k,r1,choice;





// Lizard

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 169;
	question = "Lizard";
	text1 = "A small lizard looks up at you with beady eyes. _Hiss._";
	text5 = "The lizard hisses. _Hiss. Hiss._";
	action = INTRO;

begintalknode;
	state = 169;
	nextstate = 170;
	question = "_Ummm, good lizard._";
	text1 = "_Hiss! Hiss!_";

begintalknode;
	state = 170;
	nextstate = 171;
	question = "_I suppose that hiss is all you can say._";
	text1 = "The lizard looks up at you as if deciding whether you're food or not. _Hiss. Ssss. Hiss._";

begintalknode;
	state = 171;
	nextstate = -1;
	question = "_I'm glad to see it's not._";
	text1 = "The conversation continues in this vein for some time. You learn very little.";

begintalknode;
	state = 169;
	nextstate = -1;
	condition = gf(45,12) >= 1;
	question = "_Sssss._";
	text1 = "The lizard's eyes widen in surprise. _Sss! You know the secret lizard password! Who told you? Ssssss! The other lizards must know!_";
	text2 = "The lizard runs off, tail twitching in agitation.";
	action = END_TALK;
	code =
		//erase_char(character_talking_to());
	break;

// Cat

begintalknode;
	tag = 180;
	state = -1;
	nextstate = 197;
	question = "Cat";
	text1 = "You encounter a cat. It looks up at you with the arrogance and disinterest its kind is known for.";
	text5 = "The cat stretches its back and bats at a bit of dust.";
	action = INTRO;

begintalknode;
	state = 197;
	nextstate = 198;
	question = "Pet cat. _Nice cat._";
	text1 = "_Meow?_";

begintalknode;
	state = 198;
	nextstate = -1;
	question = "_If you like me petting you, you should purr or something._";
	text1 = "It looks up at you in confusion. _Meow?_";

begintalknode;
	state = 198;
	nextstate = -1;
	question = "Keep petting it.";
	text1 = "The cat purrs happily.";

// Dog

begintalknode;
	tag = 200;
	state = -1;
	nextstate = 225;
	question = "Dog";
	text1 = "A dog bounds up to you, rubbing against your legs. It seems eager to be petted.";
	text5 = "The dog is pleased by your attention. It bounces up and down and barks.";
	action = INTRO;

begintalknode;
	state = 225;
	nextstate = 226;
	question = "Pet dog. _Good dog._";
	text1 = "Its simple canine brain is filled with overwhelming joy. _Woof! Woof!_";

begintalknode;
	state = 226;
	nextstate = 227;
	question = "Keep petting the dog.";
	text1 = "It prances about, probably wishing you had a stick or ball or something.";

begintalknode;
	state = 227;
	nextstate = 228;
	question = "Throw something.";
	text1 = "You toss a piece of your equipment. The dog runs, grabs it, and brings it back to you. It clearly could happily do this all day.";
	text2 = "Sadly, you have better things to do.";

begintalknode;
	state = 228;
	nextstate = -1;
	question = "Keep playing with the dog.";
	text1 = "Of course, then again, maybe you don't. You play fetch with the dog for a while.";
	action = END_TALK;

begintalknode;
	state = 228;
	nextstate = -1;
	question = "Leave.";
	text1 = "The dog is very sad. It follows you for a while, and then it gets distracted. You slip away.";
	action = END_TALK;

// Cave Cow

begintalknode;
	tag = 220;
	state = -1;
	nextstate = 253;
	question = "Cave Cow";
	text1 = "You meet one of the thin, pale cows that provide so much of the nourishment for Avernites. Their mushroom feed creates milk that is rank and meat that is worse, but at least it's edible.";
	text5 = "The cow munches on a mushroom unhappily and looks up at you.";
	action = INTRO;

begintalknode;
	state = 253;
	nextstate = 254;
	question = "Pet cow and say, _Good cow._";
	text1 = "_Moooo._";

begintalknode;
	state = 254;
	nextstate = -1;
	question = "_Moooo._";
	text1 = "The cow looks up, surprised, thinking perhaps that it's finally met an understanding member of its own kind.";
	text2 = "Then it sees that it's just you and goes back to chewing its cud.";

// cow

begintalknode;
	tag = 240;
	state = -1;
	nextstate = 281;
	question = "cow";
	text1 = "This is a cow, a bovine provider of sustenance for a hungry and struggling world.";
	text5 = "The cow looks up at you with tired, sad eyes and gives you a long, world-weary look. You feel it is trying to say: _What do you want from me? I'm just a cow._";
	action = INTRO;

begintalknode;
	state = 281;
	nextstate = 282;
	question = "Pet cow. _Good cow._";
	text1 = "_Moooo. Mooo. Mooooooo. Mooo._";

begintalknode;
	state = 282;
	nextstate = 283;
	question = "_Well, aren't we talkative?_";
	text1 = "_Moooo. Mu. Mooo._";

begintalknode;
	state = 283;
	nextstate = -1;
	question = "Move on.";
	text1 = "Happy that you've been able to make some sort of a meaningful connection with the creatures of nature, you move on.";
	action = END_TALK;

begintalknode;
	state = 283;
	nextstate = -1;
	question = "_Mu?_";
	text1 = "The cow looks worried, as if you've uncovered some sort of bovine secret. It edges nervously away.";
	action = END_TALK;

// chicken

begintalknode;
	tag = 260;
	state = -1;
	nextstate = 309;
	question = "chicken";
	text1 = "A chicken pecks and scratches the ground in front of you.";
	text5 = "The chicken continues its eternal search for food. Scratch. Peck. Peck. Scratch. Scratch.";
	action = INTRO;

begintalknode;
	state = 309;
	nextstate = 310;
	question = "Watch the chicken.";
	text1 = "It pecks the ground.";

begintalknode;
	state = 310;
	nextstate = -1;
	question = "Continue to watch chicken.";
	text1 = "After a little while, it finds a seed. It eats it, and resumes pecking.";

// sheep

begintalknode;
	tag = 280;
	state = -1;
	nextstate = 337;
	question = "sheep";
	text1 = "You approach the sheep. It looks at you. You look at it. The air is thick with tension.";
	text5 = "The sheep stares fixedly at you. _Baaaa,_ it says. It stares more.";
	action = INTRO;

begintalknode;
	state = 337;
	nextstate = 338;
	question = "_Stop looking at me._";
	text1 = "_Baaaa! Baaa._";

begintalknode;
	state = 338;
	nextstate = -1;
	question = "_Baaa yourself._";
	text1 = "_Baaaaa!_ it retorts. This repartee goes on for quite some time.";


// sailor

begintalknode;
	tag = 320;
	state = -1;
	nextstate = 393;
	question = "Tailor";
	text1 = "You meet a grizzled sailor, complete with tattoos, scars, and earrings. You introduce yourself and ask his name. _My name ain't none of your business._";
	text5 = "The sailor spits. _What you want? I don't got all day to jaw, you know._";
	action = INTRO;

begintalknode;
	state = 393;
	nextstate = 394;
	question = "_Are you employed?_";
	text1 = "The sailor spits and utters several very uncouth words. _I'm waitin' for a berth._";

begintalknode;
	state = 394;
	nextstate = -1;
	question = "_I'd appreciate cleaner language._";
	text1 = "The sailor responds with a brief, highly sincere monologue which contains a number of intriguing words. Being adventurers, you're not delicate hothouse flowers, but the sailor's language makes your ears burn.";

begintalknode;
	state = 394;
	nextstate = 395;
	question = "_Having any luck finding a berth?_";
	text1 = "_Nope.  With all the monsters, ain't many ships going around. Pretty stupid, if ye' ask me._";

begintalknode;
	state = 395;
	nextstate = -1;
	question = "_Why is that stupid?_";
	text1 = "_Yeah! I mean, the only place no monsters is goin' is out on the water. Best place ta' be! None of those farking, blinking, blinking monsters have the blanks to follow a marver porber out there._";
	text2 = "This short speech is punctuated with several inappropriate words, which have been replaced with gibberish to keep from offending anyone.";

begintalknode;
	state = 430;
	nextstate = -1;
	question = "_Greetings, fellow traveler._";
	text1 = "You meet a traveler, one of the many refugees and wanderers of Valorim. This person is clearly very exhausted, nervous, and eager to be left in peace. Eventually, you take the hint and move on.";
	action = END_TALK;

////

begintalknode;
	tag = 500;
	state = -1;
	nextstate = 500;
	condition = 1;
	text1 = "You enter the meeting hall of the bandit leader. He leans against a table and watches you when you enter. His blade is across the table in front of him.";
	text2 = "He doesn't seem too angry or worried. He says, _Hello, Avernite. I am called The Grinder. Master of bandits. We heard you coming, of course. We have been waiting for you._";
	code =
		set_attitude(30004,10);
	break;
	
begintalknode;
	state = 500;
	nextstate = 501;
	condition = 1;
	question = "_You seem really calm for someone called 'The Grinder.'_";
	text1 = "He nods. _It's an imposing title. A good thing to have in my line of work. I'm still able to be calm, when needed. Say, for example, when I want to make a deal with the adventurer who killed most of my warriors._";

begintalknode;
	state = 500;
	nextstate = 501;
	condition = 1;
	question = "_I'm not here to talk. I'm here to destroy you!_ (Attack.)";
	text1 = "The Grinder sweeps his sword off of the table in a lightning-fast motion. _I was afraid it would come to this. Time to add another crime to my list._";
	action = END_TALK;

begintalknode;
	state = 501;
	nextstate = -1;
	condition = 1;
	question = "_You aren't mad about my killing your warriors?_";
	text1 = "_I am annoyed, but not enough to lose my wits. Thugs and goons can always be replaced._";

begintalknode;
	state = 501;
	nextstate = 502;
	condition = 1;
	question = "_What sort of deal?_";
	text1 = "_This lair has clearly become unsafe. Yet, we don't want to give it up unrewarded. Give me all of your money, and I and my best bandits will go. Far from here. You can tell your superiors you killed me and collect the bounty._";
	text2 = "_We will even leave our hard-stolen goods here for you to reclaim. The choice is yours._";
	
begintalknode;
	state = 502;
	nextstate = -1;
	condition = 1;
	question = "_How do I know you'll keep your end of the bargain?_";
	text1 = "_If I fight you, there is a good chance I will die. Trust in my desire to live a good long life and die in my bed._";

begintalknode;
	state = 502;
	nextstate = -1;
	condition = 1;
	question = "_It's a deal._ (Give all your money.)";
	text1 = "You pass your coins across the table to The Grinder.";
	text2 = "He looks down at the paltry pile of cash and shakes his head. _A poor bargain for me, but I will be true to my word._";
	text3 = "He looks down at the decent pile of cash and nods. _A decent bargain for me. I will happily stay true to my word._";
	text4 = "The Grinder and his private guard slip out of the room and are gone. This lair of bandits has been defeated.";
	action = END_TALK;
	code =
		if (coins_amount() < 100)
			rs(3);
			else rs(2);
		change_coins(-1 * coins_amount());
		erase_char(30004);
		sf(45,11,1);
	break;
	
begintalknode;
	state = 502;
	nextstate = -1;
	condition = 1;
	question = "_Actually, I'd rather just fight._ (Attack.)";
	text1 = "The Grinder sweeps his sword off of the table in a lightning-fast motion. _I was afraid it would come to this. Pity. I offered you a decent deal. Time to add another crime to my list._";
	action = END_TALK;
